.TH E1432_SET_PRE_ARM_MODE 3 E1432
.SH NAME
.nf
e1432_set_pre_arm_mode \- Set pre-arm state
e1432_get_pre_arm_mode \- Get current pre-arm state
.fi
.IX e1432_set_pre_arm_mode(3) 3
.IX e1432_get_pre_arm_mode(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_pre_arm_mode(E1432ID hw, SHORTSIZ16 ID,
                                  SHORTSIZ16 armState)
SHORTSIZ16 e1432_get_pre_arm_mode(E1432ID hw, SHORTSIZ16 ID,
                                  SHORTSIZ16 *armState)
.cE
.SH DESCRIPTION
\fIe1432_set_pre_arm_mode\fR sets the pre-arm mode, of a single
channel or group of channels \fIID\fR, to the value given in
\fIarmState\fR.

\fIe1432_get_pre_arm_mode\fR returns the current value of the pre-arm
mode, of a single channel or group of channels \fIID\fR, into a memory
location pointed to by \fIarmState\fR.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIarmState\fR determines which arm event will allow the module to advance
from the \fBPRE_ARM\fR state into the \fBIDLE\fR state.

\fBE1432_MANUAL_ARM\fR sets the module to wait for a pre-arm event to
occur either from the system (SYNC line), or from the
\fIe1432_pre_arm_measure\fR command, in order to perform the transition.

\fBE1432_AUTO_ARM\fR sets the module to perform the transition as soon
as it enters the \fBPRE_ARM\fR state.

There are three RPM pre-arming modes:

\fBE1432_ARM_RPM_RUNUP\fR sets the module to do a pre-arm as soon as
the RPM from the tachometer board rises above the level set by the
\fIe1432_set_pre_arm_rpm\fR function.

\fBE1432_ARM_RPM_RUNDOWN\fR sets the module to do a pre-arm as soon as
the RPM from the tach board falls below the value set by the
\fIe1432_set_pre_arm_rpm\fR function.

\fBE1432_ARM_RPM_DELTA\fR sets the module to do a pre-arm as soon as
the RPM changes by the amount set by the \fIe1432_set_pre_arm_rpm\fR
functions.

There is also an external trigger pre-arm mode:

\fBE1432_ARM_EXTERNAL\fR specifies that the module should wait for an
external trigger edge before moving on to the \fBIDLE\fR state.

If there is an option AYF tachometer board present, then the second
channel on this board can be used as the external trigger.  Note that
this channel must be active (set by \fIe1432_set_active\fR) and
enabled to assert trigger (by using \fIe1432_set_trigger_channel\fR with
the \fBE1432_CHANNEL_PRE_ARM\fR parameter), in
order for it to detect an external trigger edge in the pre-arm state.

If there is no option 1D4 source board present, then there is also 
an external trigger connector, \fBExTrig\fR on the
module's front panel which can be used for external triggering.  This
external trigger must be enabled with \fIe1432_set_trigger_ext\fR to
allow it to detect an external trigger edge.  (This external trigger
input is a TTL input, so there is no way to program the trigger
level.)
.SH "RESET VALUE"
After a reset, \fIarmState\fR is set to \fBE1432_AUTO_ARM\fR. 
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_pre_arm_measure, e1432_set_arm_mode, e1432_set_pre_arm_rpm,
e1432_set_trigger_ext, e1432_set_trigger_channel
.ad
